import pygame as pg
import Peas as Peas
import sys,os
def resource_path(relative_path):
    if getattr(sys, 'frozen', False):
        base_path = sys._MEIPASS
    else:
        base_path = os.path.abspath(".")
        # base_path = os.path.dirname(os.path.abspath(__file__))
    return os.path.join(base_path, relative_path)

class PeaShooter():
    def __init__(self,
                 X = 0 * 80 + 50,
                 Y = 0 * 80 + 85) -> None:
        self.x = X
        self.y = Y
        self.img = pg.image.load(resource_path("images/plants/PeaShooter.png"))
        self.bullet = Peas.Pea
        self.rect = (self.x,self.y,self.img.get_width(),self.img.get_height())

class sinPeaShooter(PeaShooter):
    def __init__(self, X = 0, Y = 0) -> None:
        super().__init__(X, Y)
        self.bullet = Peas.sinPea

class bombPeaShooter(PeaShooter):
    def __init__(self, X = 0, Y = 0) -> None:
        super().__init__(X, Y)
        self.bullet = Peas.bombPea

class poisonousPeaShooter(PeaShooter):
    def __init__(self, X = 0, Y = 0) -> None:
        super().__init__(X, Y)
        self.bullet = Peas.poisonousPea

'''
class sinBombPeaShooter(PeaShooter):
    def __init__(self, X = 0, Y = 0) -> None:
        super().__init__(X, Y)
        self.bullet = Beans.sinBombBean
'''